package com.example.demo.mapper;

import com.example.demo.entity.Department;
import com.example.demo.entity.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DepartmentMapper {

    @Select("select * from department")
    List<Department> select();

    @Select("select * from department where id=#{id}}")
    Department selectById(Integer id);

    @Delete("delete from department where id=#{id}")
    Integer delById(Integer id);

    @Insert("insert into department(name,type,score,place,time,createby)" +
            " values(#{name},#{type},#{score},#{place},#{time},#{createby})")
    Integer insert(Department department);



}
